<!DOCTYPE html><html><head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
	<title>拒绝退货</title>
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/sendout.css" rel="stylesheet" type="text/css">
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" rel="stylesheet" type="text/css">
	<style>
        .reasonMain {
            width: 100%;
            background-color: #FFF;
            border-top: 1px solid #eaeae8;
            margin-top: 20px;
        }

        .reasonMain .reason {
            width: 92%;
            margin: 0 4%;
            border-bottom: none;
            line-height: 43px;
            height: 43px;
            font-size: 14px;
        }

        .reasonMain .reason.checked {
            border-bottom: 1px solid #eaeae8;
        }

        .reasonMain .reason .reasonTitle {
            width: 92px;
            float: left;
        }

        .reasonMain .reason .reasonSelect {
            width: 60%;
            float: left;
            color: #7885AF;
        }

        .reasonMain .reason .downicon {
            float: right;
            background: url(/res/img/gray_down_arrow.png) no-repeat;
            -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
            width: 18px;
            height: 12px;
            display: block;
            margin-top: 16px;
        }

        .reasonMain .reason.checked .downicon {
            -webkit-transform: rotate(180deg);
            transform: rotate(180deg);
        }

        .reasonMain .reasonList {
            width: 92%;
            margin: 0 4%;
            font-size: 14px;
            height: 0px;
            padding: 10px 0px;
            overflow: hidden;
            display: none;
        }

        .reasonMain .reasonList .reasonItem {
            height: 40px;
            line-height: 40px;
        }

        .otherReason {
            width: 92%;
            margin: 0 4%;
            display: none;
        }

        .otherReason textarea {
            width: 95%;
            height: 60px;
            outline: none;
            border: 1px solid #DEDEDE;
            border-radius: 3px;
            font-size: 14px;
            background-color: #F9F9F9;
            color: #404040;
            padding: 2%;
            margin-bottom: 10px;
        }

        .tips {
            color: #787B7E;
            line-height: 30px;
            height: 30px;
            text-align: right;
            margin-right: 4%;
            display: none;
        }

        .refundPublish {
            width: 92%;
            margin: 20px 4%;
            height: 45px;
            line-height: 45px;
            background-color: #06BE04;
            border: none;
            border-radius: 3px;
            color: #FFF;
            font-size: 18px;
        }

        .reasonLogList {
            background-color: #FFF;
            border-top: 1px solid #eaeae8;
            width: 92%;
            margin: 0 4%;
        }

        .reasonLogList table {
            width: 100%;
        }

        .reasonLogList table thead tr td {
            font-weight: bold;
            font-size: 13px;
        }

        .reasonLogList table tbody tr:nth-child(2n+1) {
            background-color: #F5F5F5;
        }

        .reasonLogList table tr td {
            border-bottom: 1px solid #eaeae8;
            height: 30px;
            line-height: 30px;
        }

        .reasonLogList table tr td:first-child {
            text-indent: 4px;
            width: 105px;
            padding-left: 6px;
        }

        .reasonLogList table tr td:last-child {
            text-align: right;
            width: 75px;
            padding-right: 6px;
        }

        .reasonLogList table tr:last-child td {
            border-bottom: none;
        }
        
     .reasonMain .reasonList .reasonItem {
            height: 40px;
            line-height: 40px;
        }
		</style>
	
	<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>
</head>
<body>
<div id="contentbox" style="min-height: 576px;">
    <div class="saleMain">
        <div class="title">拍品信息</div>
        <div class="goodInfo">
            <div class="img" style="background-image: url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$output['auction']['auction_add_date'].'/'.$output['auction']['auction_img1'];?>);"></div>
            <div class="desc"><?php echo bearshop_auction_description_substr($output['auction']['auction_description']);?></div>
            <div class="expressFee"><span>成交金额：</span><span><?php echo $output['order']['price'];?>元</span></div>
            <div class="endTime"><span>截拍时间：</span><span><?php echo date("Y年m月d日 H:i",$output['auction']['end_time']);?></span></div>
        </div>
    </div>

        <div class="reasonMain">
            <div class="reason">
                <div class="reasonTitle">拒绝退货理由</div>
                <div class="reasonSelect">请选择理由</div>
            </div>

            <div class="reasonList" style="height: 180px; display: none;">
                            <div class="reasonItem" reason="理由不符">理由不符</div>
                            <div class="reasonItem" reason="其它">其它</div>
             </div>
        </div>

    <div class="doMain">
    	<input type="hidden" name="reason">
        <button class="submitBtn">申请退款</button>
    </div>
</div>
<script>


$(function(){
    $(".reason").on('click', function () {
		$('.reasonList').show();
    });	

	$('.reasonItem').click(function(){
		var content = $(this).attr('reason');	
		$('input[name=reason]').val(content);
		$('.reasonSelect').html(content);
		$('.reasonList').hide();
	});

	$('.submitBtn').click(function(){
		var reason = $('input[name=reason]').val();
		var order_id = '<?php echo $_GET['order_id']?>';
		var auction_id = '<?php echo $output['auction']['id']?>';
		$.ajax({
			type:'post',
			url:'index.php?act=payment&op=refuse',
			data:{order_id:order_id,reason:reason},
			dataType:'json',
			success:function(data){
				if(data.state){
					location.href = 'index.php?act=order&op=ordersellerdetail&auction_id='+auction_id;
				}
				return false;
			}
		});
	});
});
</script>
</body>
</html>